﻿<%@ Page Title="" Language="C#" MasterPageFile="~/_console/_console.Master" AutoEventWireup="true" CodeBehind="role-detail.aspx.cs" Inherits="SmartSpace.WebApp._console.core.role_detail" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderHead" runat="server">
    <script>
        function dlg(url) {
            window.open(url, '', '');
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderMenu" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolderTitle" runat="server">
    角色信息
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolderToolbar" runat="server">
    <asp:HyperLink ID="_ctlLinkBack" runat="server" NavigateUrl="~/_console/core/role-list.aspx">返回</asp:HyperLink>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="ContentPlaceHolderContent" runat="server">
    <div class="box">
        <h2>角色基本信息
        </h2>
        <div class="block">
            <div class="form">
                <label>
                    编号</label><br />
                <asp:TextBox ID="_ctlEditCode" ClientIDMode="Static" runat="server" Width="400" ReadOnly="true"></asp:TextBox><br />
                <label>
                    名称</label><br />
                <asp:TextBox ID="_ctlEditCaption" ClientIDMode="Static" runat="server" Width="400" ReadOnly="true"></asp:TextBox><br />
            </div>
        </div>
    </div>

    <div class="box">
        <h2>所继承的角色
        </h2>
        <div class="block">
            <div>
                <a href="javascript:void();" onclick="<%=string.Format("dlg('role-relation-add.aspx?id={0}');", RoleId) %>"">添加</a>
                <asp:LinkButton ID="_ctlBtnUnRelate" runat="server" OnClick="_ctlBtnUnRelate_Click">删除</asp:LinkButton>
            </div>
            <table style="width:100%;">
                <tr>
                    <th style="width:50px;">
                        -
                    </th>
                    <th>所属模块
                    </th>
                    <th>角色类型
                    </th>
                    <th>角色编号
                    </th>
                    <th>角色名称
                    </th>
                </tr>
                <asp:Repeater ID="_ctlListParentRoles" runat="server">
                    <ItemTemplate>
                        <tr>
                            <td>
                                <asp:CheckBox ID="_ctlCheck" runat="server" />
                                <asp:HiddenField ID="_ctlTag" runat="server" Value='<%# Eval("Id") %>' />
                            </td>
                            <td>
                                <%# Eval("Module") %>
                            </td>
                            <td>
                                <%# Eval("Code") %>
                            </td>
                            <td>
                                <%# Eval("Caption") %>
                            </td>
                            <td>
                                <%# Eval("Type") %>
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
            </table>
        </div>
    </div>

    <div class="box">
        <h2>所拥有的权限
        </h2>
        <div class="block">
            <div>
                <a href="role-privilege-assign.aspx?id=<%=RoleId.ToString() %>">添加</a>
            </div>
            <table style="width: 100%;">
                <tr>
                    <td style="width: 100px;">-</td>
                    <td style="width: 100px;">编号</td>
                    <td style="width: 100px;">名称</td>
                    <td style="width: 100px;">类型</td>
                    <td style="width: 100px;">来源</td>
                    <td>&nbsp;</td>
                </tr>
                <asp:Repeater ID="_ctlList" runat="server">
                    <ItemTemplate>
                        <tr>
                            <td>
                                <asp:CheckBox ID="_ctlCheck" runat="server" />
                                <asp:HiddenField ID="_ctlTag" runat="server" Value='<%# Eval("PrivilegeId") %>' />
                            </td>
                            <td>
                                <%# Eval("PrivilegeCode") %>
                            </td>
                            <td>
                                <%# Eval("PrivilegeCaption") %>
                            </td>
                            <td>
                                <%# Eval("PrivilegeType") %>
                            </td>
                            <td>
                                <a href="#" title="提示，提示，提示">来源</a>
                            </td>
                            <td>&nbsp;
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
            </table>
        </div>
    </div>
</asp:Content>
